/**
 * \file UnitLR.h
 * \brief Header for UnitLR class.
 * \ingroup Unit
 */

#ifndef UNITLR_H
#define UNITLR_H

#include"Unit.h"

class Field;

#include<QList>

/**
 * \class UnitLR
 * \brief Used to model some specifics about a long ranged \a Unit.
 * \ingroup Unit
 */


class UnitLR: public Unit{
public:
	UnitLR(Map *map, UnitAge age, Team team);///<Constructor. \param map The \a Map this \a Unit is on. \param age The \a UnitAge this \a Unit is from. \param team The \a Team this \a Unit is on.
	~UnitLR();
	
	UnitType type()const{ return TYPE_LR; }///<Returns this \a Unit 's \a UnitType.
	
	double getAttackPriority(const Unit *unit)const;///<Returns priority to attack unit with. \param unit The \a Unit whose priority to calculate.
	
	int getFieldPriorityForField(Field *field)const;///<Returns the priority for this \a Field, decided by its terrain type. \param field The \a Field for which to calculate the priority.
	
	virtual int defenseBonusAgainst(UnitType type)const;///<Returns the defense bonus against a certain \a UnitType. \param type \a UnitType of the respective \a Unit to test defense against.
	virtual int attackBonusAgainst(UnitType type)const;///<Returns the attack bonus against a certain \a UnitType. \param type \a UnitType of the respective \a Unit to test attack against.
	
	virtual int attackTerrainBonus()const;///<Returns the attack bonus from the current \a Field this \a Unit is on.
	virtual int defenseTerrainBonus()const{ return 0; }///<Returns the defense bonus from the current \a Field this \a Unit is on. Always 0 for this \a Unit type.
private:
	static QString _getFullName(UnitAge age);///<Returns the full name for a \a Unit of this type for this \a UnitAge. \param age The \a UnitAge for this unit.
	void _initStats(UnitAge age);///<Initializes this \a Unit 's state for given \a UnitAge. \param age The \a UnitAge for this unit.
	
	int m_attackBonusHills;///<This \a Unit 's attack bonus when on hills.
	int m_attackBonusHM;///<This \a Unit 's attack bonus when attacking Heavy Melee.
	int m_defenseBonusHM;///<This \a Unit 's defense bonus when attacked by Heavy Melee.
};

#endif
 
 
